home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
PROGRAMM
/
OTHER_LA
/
0289.ZIP
/
UTILSDOC.TXT
< prev
Wrap
Text File
|
1986-11-19
|
23KB
|
520 lines
ASMSTAT
This utility program compiles some interesting statistics about assembly
language programs. It reads in assembly language programs (formatted
according to the rules for Microsoft's MS/DOS assembler, although it
would probably work with most compatible-format assembly languages) and
produces statistics indicating the ratio of comment keystrokes to program
keystrokes, and many other interesting statistics. It is surprising
to see how closely an individual programmer's statistics end up being,
even in quite different programs. This program can also be used to
"screen" a series of programs, to see which might need be checked for
adequate commenting. The program is invoked with a command line of
the form:
snorun asmstat <<inputfilespec>
Note that the first of the left-pointy-brackets above is used in the
actual command line to redirect the input to the program from the file
indicated by <inputfilespec>. Alternatively, this first "<" character
may be replaced by "/5:" or "/5=". (These are generally the three ways
to redirect the input file to any program based on SNORUN).
Example command lines would look like:
snorun asmstat <c:\asm\prog1.asm
snorun asmstat <myprog.asm
DIFFER
This utility program compares two text files and indicates how many areas
in the file have been changed. A report is produced to compare the
changed areas.
The program is basically the work of P.R. Tallett, Datacall Ltd,
Kirkstall Rd., Leeds, England. It has been elaborated somewhat by A. P.
McCann. Inclusion of line numbers and slight rework for the IBM PC
version has been done by David Shields and Robert Dewar. Several bugs
in command line scanning and end-of-file handling have been corrected
by Gordon Peterson II.
The program is invoked by a command line of the form:
differ <file1> <file2> <outfile> [<options>]
The first two file specs define the two input files to be compared,
and these two must be present. The third file spec, if present,
defines where the output file is to go. This can be either a disk file
or a device (such as CON, PRN, or LPTn). If no output file is specified,
the console is assumed. (Note that if the /W format is being routed to
the console, it is much more readable if /W39 is specified).
<options>::
/M
This option forces blank lines to match in compared files. The
default is that blank lines are ignored during the matching
process.
/L[n][+]
This option specifies that "n" lines must be found identical before
the program can assume the files are again in parallel. The
default is 3. If the + is found, then the listing includes the
n lines which were the same. The default is that only the first
such line matching gets included in the listing.
/Rc
Normally, any character found in either input file less than 20H
is replaced by a "?" character in the output report. If this
option is specified, the character specified as "c" specifies an
alternate replacement character to use instead.
/X
This option prevents the replacement of characters less than 20H
in the output report. (They are retained and output as found in
the input files).
/W[n][-]
This option specifies that a double column listing format is to be
used. Use of this option is recommended. The first "n" characters
of each line (one from file1, one from file2) are printed side by
side, making the comparison easier. The total line length is 2n + 2
including the separator characters. Default is 65. The "-" sign,
if present, reduces the length of the line of asterisks separating
the blocks of different code. The "-" option, which might be useful
on slow printers, is not really recommended.
Example:
To compare "OLDVER.TXT" with "NEWVER.TXT" and print a file of the
changes, the suggested command line would be:
differ oldver.txt newver.txt prn /W
DIRCMP2
This utility program allows comparing the files within specified
directories. The directories may be on the same or different disk
volumes, and may also be network volumes running within, for example,
PC network. The program is invoked with a command line of the form:
snorun dircmp2 ;CMDFILE=<cmdfile>[,BATFILE=<outputfile>]
The CMDFILE contains entries of the form:
MATCH C:\,D:\
MATCH D:\ASM\SRCPROG,F:\ASM\SRCPROG
MATCH D:\PROG,D:\PROG\BACKUP
Each of these entries define a pair of subdirectories (and the drives on
which they are located) which are to be compared. There are three
output streams from the program:
Display output (written to SCREEN) includes progress messages which
are displayed on the screen as each new directory is read from the
specified drive.
Standard output (written to OUTPUT) includes an echo of each entered
command received. This is followed by a listing of all files in the
two subdirectories which are of different age or size, as well as those
which are missing from one or the other of the directories. Note that
the program will not process MATCH commands where one or the other of
the two subdirectories is missing or contains no files (and lower-
level subdirectories do not count as a file for the purpose of this
test!) This stream is normally redirected to either the printer or an
output file for subsequent analysis.
Batch output (written if the BATFILE= option is specified) consists of
a batch file which includes COPY commands which update older versions
of files from the newer versions, and copies over files which previously
were missing from one or the other of the corresponding subdirectories.
DIRCMP2 is a very useful tool for maintaining, for example, a series of
subdirectories which include files being maintained by separate
programmers. It also is very useful if a programmer is maintaining
a file server subdirectory, but updates his own personal copy on his
own machine and then periodically wants to update the later versions
to the generally-available copies on the file server.
DIRTREE
This utility program allows listing subdirectory information on either
an entire volume or within any specified subdirectory of a volume. All
options may be entered in either upper or lower case. The output file
may be redirected in the same way one would redirect any other output
file produced via SNORUN.
snorun dirtree [<iooptions>][;<options>]
<iooptions>::
/6=<outputspec>
This option allows putting the output of DIRTREE to a disk file
or to the printer. Either the equal sign (as shown) or a colon
are equally valid delimiters for this option. Example command
lines are:
snorun dirtree /6=lpt1: ;path=c:
snorun dirtree /6=c:\prt\mydirs.prt ;path=d:
><outputspec>
The output of DIRTREE may also be routed to a disk file or a
device by simple redirection. Example command lines are:
snorun dirtree >mydirs.prt ;path=d: list
>><outputspec>
The output of DIRTREE may be appended to a disk file. To create
a disk file containing the listings of all valid paths for hard
drives C: and D:, the command lines might be:
snorun dirtree >mydirs.txt ;path=c: list
snorun dirtree >>mydirs.txt ;path=d: list
<options>::
path=<pathname> or
/p=<pathname>
This option allows specification of the path name to be used for
the subdirectory lookup. Example pathnames are:
c: a:ms* d:ms?as* etc.
The default path name is "\".
/dpo
This option causes no subdirectory scanning, but merely displays
the effective path name that would be used for the lookup.
list or
/l
This option causes all subdirectories to be written to the output
file. They are output as FULL PATH NAMES, in sorted, interleaved
sequence.
indent or
/i
This option causes all subdirectories to be written to the output
file. They are output as FULL PATH NAMES, in sorted, interleaved
sequence, just as for the "list" form, except that nested
subdirectories are indented.
stair or
step or
/s
This option causes all subdirectories to be written to the output
file. They are output, one subdirectory to a line (with higher
levels of each path name suppressed), in sorted, interleaved
sequence. The left end of each nested subdirectory is lined up
under the right hand end of the name of the containing (sub)-
directory above.
tree or
/t
This option causes all subdirectories to be written to the output
file in the style used by PCTOOLS, except in a continuous format
(PCTOOLS displays them one screenful at a time, making it incon-
venient to print them).
nohdr or
/nh
This option suppresses the heading from being written to the output
file. The heading contains the path name used, the date and time,
and the volume name (unless suppressed).
novol or
/nv
This option suppresses the volume name from being accessed. If
not suppressed, the volume name is read and placed in the heading
(which could also be suppressed).
LIST
This utility program allows listing a text file with a variety of
options.
Note that you may have LIST in either of two forms, the SNOBOL4+
form (with the extension .SAV) or the SPITBOL form (with the extension
.EXE). The command lines are slightly different between the two forms:
If you have LIST.SAV, use the "snorun" form of the command line; if
you have LIST.EXE, use the "list" form of the command line instead.
snorun list ;<inputfile>[,<outputfile>][<options>] OR:
list <inputfilespec>[,<outputfile>][<options>]
<outputfile>::
This item specifies the name of a file to which output is to be
written. If no file name is specified, default is to output to
PRN: (the printer).
<options>::
/f
This option specifies that the file being listed is already in
print file format. No headings are added, and no numbering of
lines is done. The file is assumed to contain no tab characters.
/n<integer>
This option allows specifying how many input record lines are to
be printed on each page. The default is 55.
/p
This option causes a print file to be generated. This file
is formatted for being output to a printer, including page
headings. The extension defaults to ".LST" if none is specified.
/q
This option causes the output to be appended to the end of the
output file, if it already exists. If the output file is empty
or does not already exist, this option has no effect.
/t<integer>
This option causes any tab characters encountered to be expanded
so that tabs occur every <integer> columns. The default is to
tab every eight columns.
/x
This option causes numbering of the lines to be suppressed. The
default is to number the input records. The first record number
is 1.
MELIZA
This is a version of the famous "ELIZA" psychoanalysis program, one of
the earliest famous attempts at "artificial intelligence". Although
this program is relatively straightforward, if the subject is persistent
for a while, and attempts to converse seriously, the program can
occasionally produce some rather startling insights and is sometimes
terribly funny. (ELIZA is the happiest when you talk to her using
complete sentences.)
MSCRIBE
This utility program is similar to the Datapoint MSCRIBE program. It
reads in a simply formatted text file, and ends up producing a nicely
formatted version of the documentation, according to a standard format.
This is suitable for product specifications, user's guides, and such.
MSCRIBE works in conjunction with the Borland program SUPERKEY and the
word processing program WORDSTAR 2000+. The output macro files are
kept smaller than 8K bytes, by segmenting them into multiple files (the
extension of the macro file name is incremented for additional macro
files, which are automatically linked). WORDSTAR 2000 should be con-
figured to support document histories. Also, before running the "key"
command below, it is assumed that a format file (same name as the input
file, but with extension .FRM) exists for the document body, and that
the format file MSCRIBET.FRM exists (which is used for the title page
and preface). The final document is to be found in the resulting files
with extensions .TIT, .TOC, and .BOD, which are then printed by WORDSTAR.
Note that you may have MSCRIBE in either of two forms, the SNOBOL4+
form (with the extension .SAV) or the SPITBOL form (with the extension
.EXE). The command lines are slightly different between the two forms:
If you have MSCRIBE.SAV, use the "snorun" form of the command line; if
you have MSCRIBE.EXE, use the "mscribe" form of the command line instead.
snorun mscribe /5:<inputfilespec> /6:<macrofilespec> OR:
mscribe /5:<inputfilespec> /6:<macrofilespec>
key <macrofilespec> /ml
The input file contains text with embedded formatting commands. These
commands are all beginning in column one of their record. Within the
input file, the following formatting commands are used:
+m1 <projectname>
This command furnishes the project name for the document.
+m2 <title>
This command furnishes the title of the document.
+m3 <documenttype>
This command furnishes the type of document ("User's Guide", "Prelimin-
ary Specification", or the like).
+m4 <date>
This command supplies the version date of the document.
+m5
This command indicates that the following text (beginning with the next
record) is the Preface for the document.
+m6 <docdescription>
This command indicates the end of the Preface and supplies the name for
the Body file (this is keyed into the Document History kept by Wordstar
for the main part of the document). It also indicates where the Table
of Contents is to be inserted.
+m7 0. <chapterheading>
This command supplies the heading for each chapter. The "0" is auto-
matically replaced by MSCRIBE with the chapter number.
+m8 0.0[[.0].0] <sectionheading>
This command supplies the heading for each section, subsection, etc.
The zeros are automatically replaced by MSCRIBE with the appropriate
numbers for the given section, subsection, or sub-subsection. Four
levels of section numbers are presently supported (more could be
supported on request, but Wordstar 2000+ only supports four levels in
its table of contents, hence the restriction). The number of zeros
indicate the nesting level.
+pp<n> (e.g. +pp0, +pp1, etc.)
This command causes the text following to be the start of a new para-
graph. You may start the new paragraph either on the following line or
on the same line as the +pp<n>, as long as at least one space follows
the command (and optional number). New paragraphs are automatically
assumed after any +m<n> heading command which is followed by text.
+sl<n> (e.g. +sl0, +sl1, etc.)
This command causes the text following (beginning on the following line)
to be the start of a new paragraph. You may start the new paragraph
either on the following line or on the same line as the +sl<n>, as long
as at least one space follows the command (and optional number). The
only difference between this command and the +pp command is that using
this command keeps the new paragraph from being indented.
+turnoff
This causes text following it to be ignored, including any +m<n> commands
that might be encountered, until a +turnon command is encountered.
OVER
This utility program is used to shift print files right by a specified
number of columns. It is useful, for example, to get a listing of
a program documentation file which can be put into a binder without the
leftmost characters of each line becoming buried in the binding. If
one or more nonprinting printer control characters are at the beginning
of each record, they are kept at the beginning and the padding characters
are inserted following those control characters.
over <inputfilespec> <outputfilespec> [/n<integer>]
<inputfilespec>::
file name and extension, with optional drive spec and/or path name,
defining where the input is to come from.
<outputfilespec>::
file name and extension, with optional drive spec and/or path name,
or device name, where the output file is to be placed. It may also
be written to a specified device.
/n<integer>::
This option specifies by how many columns the input file is to be
shifted to the right. The default is twenty columns. The option
letter "n" may be either upper or lower case. Examples for this
option would look like:
/N16
/n7
Therefore, example command lines might be:
over file1 file1ovr /n5
over a:docfile.txt c:\docfiles\over\docfileo.txt
SPACE
This utility program is an enhanced version of DIRTREE (shown above).
Like DIRTREE, it allows listing subdirectory information on either
an entire volume or within any specified subdirectory of a volume.
However, SPACE optionally displays the number of files and sectors
contained within each subdirectory, broken down by file extension within
that subdirectory, and for the entire volume (or highest level path
as specified on the command line). (Note that, throughout the options
descriptions that follow, ":" and "=" are both equally acceptable
between an option keyword and its specified value.) Also, all options
may be entered in either upper or lower case.
snorun space [<iooptions>][;<options>]
<iooptions>::
><outputfile> or
>><outputfile> or
/6=<outputfile> or
/6:<outputfile>
This option allows specification of a file (or device) to which
the output file is to be written. This can be either a printer
or a disk file, or in general any MS/DOS sequential output device.
<options>::
path=<pathname> or
/p=<pathname>
This option allows specification of the path name to be used for
the subdirectory lookup. Example pathnames are:
c: a:ms* d:ms?as* etc.
The default path name is "\".
alloc or
/a
This option causes the output of space utilization reports which
are sorted in descending order by amount of space used for files
of each given extension.
/dpo
This option causes no subdirectory scanning, but merely displays
the effective path name that would be used for the lookup.
dup or
/d
This option causes an analysis and report of possible duplicate
files. A report is generated of all files of the exact same
length and generation time for the specified path(s). Although
the data in the files is not actually checked, use of this option
will generally turn up several files which are needlessly wasting
space on your hard disk by existing in several places at the same
time. Note that it is not necessary that the file name or
extensions be the same for them to turn up on this report.
ext or
/x
This option causes the output of space utilization reports which
are sorted in alphabetic order of file extension. This option
takes precedence over the "alloc" and "/a" options, should both
be specified.
list or
/l
This option causes all subdirectories to be written to the output
file. They are output as FULL PATH NAMES, in sorted, interleaved
sequence.
indent or
/i
This option causes all subdirectories to be written to the output
file. They are output as FULL PATH NAMES, in sorted, interleaved
sequence, just as for the "list" form, except that nested
subdirectories are indented.
stair or
step or
/s
This option causes all subdirectories to be written to the output
file. They are output, one subdirectory to a line (with higher
levels of each path name suppressed), in sorted, interleaved
sequence. The left end of each nested subdirectory is lined up
under the right hand end of the name of the containing (sub)-
directory above.
tree or
/t
This option causes all subdirectories to be written to the output
file in the style used by PCTOOLS, except in a continuous format
(PCTOOLS displays them one screenful at a time, making it incon-
venient to print them).
util or
/u
This option causes the output of space utilization reports. These
reports break down the number of files and number of bytes
allocated per file extension, per subdirectory. If more than one
space utilization report is produced, a summary report is also
provided at the end which consolidates all of the previously
produced space utilization reports. Note that the number of bytes
allocated as shown in these reports does not include the additional
unused bytes normally found at the end of each file. The default
ordering of these reports is in alphabetic order by file extension.
width=<integer> or
/w=<integer>
This option sets the width of the output lines to the indicated
maximum width. The default maximum width is 80. If the usage
option is in effect, setting the maximum width to 132 (or some
value bigger than 80) may result in more columns being able to
fit per output line.
nohdr or
/nh
This option suppresses the heading from being written to the output
file. The heading contains the path name used, the date and time,
and the volume name (unless suppressed).
novol or
/nv
This option suppresses the volume name from being accessed. If
not suppressed, the volume name is read and placed in the heading
(which could also be suppressed).